package persistence;

import java.util.List;
import java.util.Set;

import model.entity.container.ProductContainer;
import model.entity.container.ProductGroup;
import model.entity.container.StorageUnit;

import common.Result;
import common.ValueResult;

/**
 * @author Trevor Dixon
 * 
 *         An object that provides access to a data store.
 * 
 * @param <Entity>
 *          The data transfer object type used to shuttle data to and from this data access object.
 */
public interface ProductContainersDAO
{

  public ValueResult<Set<StorageUnit>> getStorageUnits();

  public ValueResult<List<ProductGroup>> getProductGroups();

  /**
   * Adds an entity to the data store.
   * 
   * @param dto
   * @return A Result indicating whether the operation was completed successfully.
   */
  public Result add(ProductContainer productContainer);

  /**
   * Updates an entity in the data store.
   * 
   * @param dto
   * @return A Result indicating whether the operation was completed successfully.
   */
  public Result update(ProductContainer productContainer);

  /**
   * Removes an entity from the data store.
   * 
   * @param dto
   * @return A Result indicating whether the operation was completed successfully.
   */
  public Result delete(ProductContainer productContainer);

  public Result saveStorageUnits(Set<StorageUnit> storageUnits);

  public Result saveProductGroups(List<ProductGroup> productGroups);
}
